<template>
    测试
    <el-button type="primary" @click="openChildDialog">打开子dialog</el-button>
    <el-button type="primary" @click="closeDialog">关闭弹窗</el-button>
  </template>

<script setup lang="ts">
import { shallowRef } from 'vue'
import { addDialog } from '@/components/gDialog/index'
import innerDialog from './child.vue'
const props = defineProps(['id'])
console.log(props.id, 'props')
const emit = defineEmits(['close'])
const closeDialog = () => {
  emit('close', 1, 2, 34)
}
const openChildDialog = () => {
  addDialog({
    title: '我是子dialog',
    width: '500px',
    component: shallowRef(innerDialog)
  })
}
</script>
